<?php if (!defined('THINK_PATH')) exit();?><!--<meta http-equiv="refresh" content="1"/>-->
<link href="/Public/Admin/css/same.css"  type="text/css" rel="stylesheet"/>
<link href="/Public/css/bootstrap.css"  type="text/css" rel="stylesheet"/>
<script src="/Public/js/jquery-1.11.3.min.js" type="text/javascript"></script>
<script src="/Public/js/layer/layer.js" type="text/javascript"></script>
<script src="/Public/js/bootstrap.js" type="text/javascript"></script>
<script src="/Public/Admin/js/ReadRecord.js" type="text/javascript"></script>
<div class="a-main-left-content">
    <div class="a_con_title">
        <h4>读者档案管理</h4>
    </div>
    <div class="a_title_tip">
        <img class="a_record_icon" src="/Public/img/record_01.jpg"/>
        <span class="a_record_news">请认真修改读者信息，如有泄露追究法律责任。</span>
    </div>

    <div class="read_type_box">
        <form action="<?php echo U('Admin/ReadManage/readRecordInfoSave');?>" method="post" enctype="multipart/form-data">
            <div class="record_save_box">
                <div class="record_save_span">
                    <span><c>*</c>读者名称：</span>
                </div>
                <input type="text" name="u_name" value="<?php echo ($_getUserInfo['u_name']); ?>">
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>读者邮箱：</span>
                </div>
                <input type="text"  value="<?php echo ($_getUserInfo['u_email']); ?>" readonly="" class="record_save_color">
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span><c>*</c>读者电话：</span>
                </div>
                <input type="text" name="u_tel" value="<?php echo ($_getUserInfo['u_tel']); ?>" onkeyup="value=this.value.replace(/\D+/g,'')">
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>读者年龄：</span>
                </div>
                <input type="text" name="u_age" value="<?php echo ($_getUserInfo['u_age']); ?>" onkeyup="value=this.value.replace(/\D+/g,'')" >
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>联系地址：</span>
                </div>
                <input type="text" name="u_address" value="<?php echo ($_getUserInfo['u_address']); ?>">
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>用户邮编：</span>
                </div>
                <input type="text" name="u_postcode" value="<?php echo ($_getUserInfo['u_postcode']); ?>">
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>读者性别：</span>
                </div>
                <select name="u_sex"  value="<?php echo ($_getUserInfo['u_sex']); ?>">
                    <?php if($_getUserInfo['u_sex'] == 1): ?><option value="1" selected>未设置</option>
                        <option value="2">女</option>
                        <option value="3">男</option><?php endif; ?>
                    <?php if($_getUserInfo['u_sex'] == 2): ?><option value="1">未设置</option>
                        <option value="2" selected>女</option>
                        <option value="3">男</option><?php endif; ?>
                    <?php if($_getUserInfo['u_sex'] == 3): ?><option value="1">未设置</option>
                        <option value="2" >女</option>
                        <option value="3" selected>男</option><?php endif; ?>
                </select>
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>读者类型：</span>
                </div>
                <input type="text" value="<?php echo ($_getUserInfo['u_type_name']); ?>" readonly="" id="type_save_name">
                <input type="button" value="更换" id="type_save_name1" data-toggle="modal" data-target="#myModal">
                <!-- Modal -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                <h4 class="modal-title" id="myModalLabel">读者类型修改<span id="record_red_save">（请慎重修改）</span></h4>
                            </div>
                            <div class="modal-body">
                                <div class="top_form_read">
                                    <span>读者类型名称：</span>
                                    <select name="u_type_id" id="u_type_id">
                                        <?php if(is_array($_getAllReadType)): $i = 0; $__LIST__ = $_getAllReadType;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo['u_type_id']); ?>"><?php echo ($vo['u_type_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                <button type="button" class="btn btn-primary save" save-data="<?php echo ($_getUserInfo['u_id']); ?>" >修改</button>
                            </div>
                            <input type="hidden" value="<?php echo U('Admin/ReadManage/readRecordTypeSave');?>" id="save-url">
                        </div>
                    </div>
                </div>
                <!----->
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>认证状态：</span>
                </div>
                <?php if($_getUserInfo['u_status'] == 1): ?><input type="text"  value="未认证" readonly="" class="status_save_center"><?php endif; ?>
                <?php if($_getUserInfo['u_status'] == 2): ?><input type="text"  value="认证" readonly=""><?php endif; ?>
                <?php if($_getUserInfo['u_status'] == 3): ?><input type="text"  value="待认证" readonly=""><?php endif; ?>
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>用户状态：</span>
                </div>
                <?php if($_getUserInfo['u_del'] == 1): ?><input type="text"  value="未禁用" readonly="" class="status_save_center"><?php endif; ?>
                <?php if($_getUserInfo['u_del'] == 2): ?><input type="text"  value="禁用" readonly=""><?php endif; ?>
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>注册时间：</span>
                </div>
                <input type="text"  value="<?php echo date('Y-m-d H:i:s',$_getUserInfo['u_regdate']);?>" readonly="" class="record_save_color">
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>最后登陆时间：</span>
                </div>
                <?php if($_getUserInfo['u_lastlogindate'] == null): ?><input type="text" placeholder="用户未登录" readonly="">
                    <?php else: ?>
                    <input type="text" value="<?php echo date('Y-m-d H:i:s',$_getUserInfo['u_lastlogindate']);?>" readonly="" class="record_save_color"><?php endif; ?>
            </div>
            <div class="record_save_box">
                <div class="record_save_span">
                    <span>用户头像：</span>
                </div>
                <img src="/Public/Uploads/<?php echo ($_getUserInfo['u_pic']); ?>" width="200" height="80" alt="未上传头像" class="record_img">
                <input type="file" name="u_pic" id="record_pic">
            </div>
            <div class="table-submit1" id="record_height">
                <input type="submit" value="提&nbsp;交">
            </div>
        </form>
    </div>

</div>